#ifndef DWMRI_DEFINES_H
#define DWMRI_DEFINES_H

#include <stdlib.h>



typedef unsigned int uint;


#ifdef __linux
#define SLASH '/'
#endif

#ifdef _WIN32
#define SLASH '\\'
#endif


#ifndef HOT_TD_NORM_THRESHOLD 
#define HOT_TD_NORM_THRESHOLD 0.1f
#endif

#ifndef HOT_TD_LS_THRESHOLD
#define HOT_TD_LS_THRESHOLD 0.08f
#endif

#ifndef PATHNAME_SIZE
#define PATHNAME_SIZE 256
#endif

#ifndef SAMPLE_POINT_NUM
#define SAMPLE_POINT_NUM 100
#endif

#ifndef MAX_DIRECTIONS
#define MAX_DIRECTIONS 3
#endif

#ifndef DEFAULT_PARAMETERS
#define DEFAULT_PARAMETERS

#define DEFAULT_FA_THRESHOLD 0.1f
#define DEFAULT_ANGLE_THRESHOLD 0.707f
#define DEFAULT_STEP_SIZE 0.2f;
#define DEFAULT_MAX_LENGTH 50.0f;
#define DEFAULT_SCALE 2

#endif

template< class T > void SafeDelete( T*& pVal )
{
	if (pVal != NULL) {
		delete pVal;
		pVal = NULL;
	}
}

template< class T > void SafeDeleteArray( T*& pVal )
{
	if (pVal != NULL) {
		delete[] pVal;
		pVal = NULL;
	}
}

#endif